package cn.edu.nju.software.managers;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionManage {

	//parameters used to connect the database
	private static String head = "jdbc:mysql://192.168.1.100:3306/";
	private static String databaseName = "course_manage";
	private static String userName = "root";
	private static String password = "root";
	
	public static Connection getConnection() throws SQLException{
		String url = head + databaseName + "?user=" + userName +"&password=" + password;
		Connection connection = DriverManager.getConnection(url);
		return connection;
	}
}
